package com.kk.bird;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;

/**
 * @author kzy
 * @version 1.0
 * @date 2023/2/7
 */
public class Ground {
    BufferedImage image = ImageIO.read(this.getClass().getResource(GameConfig.pictureUrl+"ground.png"));
    int x;
    int y;
    int width;
    int height;

    public Ground() throws Exception {
        this.width = this.image.getWidth();
        this.height = this.image.getHeight();
        this.x = 0;
        this.y = 500;
    }

    public void step() {
        --this.x;
        if (this.x == -109) {
            this.x = 0;
        }

    }
}
